﻿@import "variables.less";
@import "mixins.less";
@import "types.less";
//
// 表格
//
.table {
    width: 100%;
    border-collapse: separate;
    border: @table-cell-border;
    border-bottom: none;
    border-radius: @table-border-radius;
    thead,
    tbody,
    tfoot {
        tr {
            th {
                color: @table-header-color;
                font-size: @table-header-font-size;
                font-weight: bold;
            }
            td {
                color: @table-cell-color;
            }
            th,
            td {
                min-width: 100px;
                max-width: 130px;
                padding: @table-cell-padding;
                border-bottom: @table-cell-border;
                border-right: @table-cell-border;
                color: @black;
                font-weight: bold;
                line-height: @table-cell-line-height;
                text-align: center;
                .text-overflow();
                &:last-child {
                    border-right: none;
                }
                &.input {
                    padding: 0;
                    input,
                    select {
                        padding: @table-cell-padding;
                    }
                }
            }
            td:first-child {
                img {
                    .icon(16px, 0);
                    cursor: pointer;
                }
            }
            &.danger {
                background: none;
                th,
                td {
                    color: @table-row-anger-color;
                }
            }
        }
    }
    thead:not(:last-child) tr th {
        border-bottom: @table-cell-border;
    }
    &+.table {
        margin-left: 20px;
    }
    select,
    input {
        border: none;
        text-align: center;
    }
}

.table-condensed {
    thead,
    tbody,
    tfoot {
        tr {
            th,
            td {
                padding: @table-condensed-cell-padding;
                font-size: @table-condensed-cell-font-size;
            }
        }
    }
}

.table-hover {
    tbody tr:hover {
        background-color: @table-hover-bg;
    }
}

.table-visable {
    overflow: visible !important;
}

.table-responsive {
    margin-top: 20px;
    overflow-x: auto;
    min-height: 0.01%;
}

// 行状态
.table-row-variant(active, @table-active-bg);
.table-row-variant(success, @state-success-bg);
.table-row-variant(info, @state-info-bg);
.table-row-variant(warning, @state-warning-bg);
.table-row-variant(danger, @state-danger-bg);